Skip to content

[Fix] Next Slack question disappears when prompt delivery fails - #2447

Draft
roomote-roomote[bot] wants to merge 6 commits into
developfrom
fix/slack-prompt-delivery-retry-31kfl7gwl8w46
Draft

[Fix] Next Slack question disappears when prompt delivery fails#2447
roomote-roomote[bot] wants to merge 6 commits into
developfrom
fix/slack-prompt-delivery-retry-31kfl7gwl8w46

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

Slack multi-question prompts now recover automatically when the first attempt to post the next question fails after answer state has advanced. Button selections and typed replies share the same delivery lifecycle, which makes two bounded attempts with the same stable message identity and preserves idempotency when Slack accepted an ambiguous first request.

The answered prompt is retired only after a next-prompt post returns a timestamp. If both automatic attempts fail, the saved answer and old controls remain intact, and Slack shows a concise delivery failure without asking the user to repeat the answer.

Why this change was made

The Redis transition completes before Slack delivery. Previously, typed replies independently retired the old prompt before making one unchecked post. A transient or ambiguous failure in either input path should not hide the current prompt, turn internal ordering into a manual retry workflow, or advance the question twice.

The recovery path deliberately preserves the advanced state rather than rolling it back, because a transport failure can occur after Slack accepted the post.

Impact

Users normally proceed to the next question without intervention after a transient delivery failure, whether they click an option or type a reply. Exhausted delivery remains safe and visible: state advances exactly once, old controls stay available as a fallback, and stale or different answers cannot mutate hidden state.

The branch now includes current develop and passes the root Type Check that previously failed because automation search omitted the required scheduling timezone. The same correction also lets the web production build complete, covering the failing stage inside the app Docker build. The Slack package suite, repository lint, knip, and pre-push checks pass; no database schema or external protocol changed.

@roomote-community

roomote-community Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • packages/slack/src/handle-followup-answer.ts:221 Retiring the answered prompt before confirming the next prompt was posted removes the only retry control after delivery fails.
  • apps/api/src/handlers/slack/events/active-run.ts:277 Typed Slack replies now use the same confirmed, bounded next-prompt delivery lifecycle.

Reviewed 3126f88

Comment thread packages/slack/src/handle-followup-answer.ts Outdated
@roomote-roomote

roomote-roomote Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Updated in 71ef5938: next-question delivery now makes two automatic attempts with the same stable client_msg_id, advances state once, and retires the old controls only after confirmed delivery. Exhaustion keeps the saved state and old controls, with concise failure copy that does not ask users to repeat their answer. All 464 Slack tests and static/pre-push gates pass.

Comment thread packages/slack/src/handle-followup-answer.ts
@roomote-roomote

roomote-roomote Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 3126f882. Both failures had the same cause in the merge with newer develop: automation cadence formatting required a timezone, but one search-index call omitted it. The branch now includes current develop, the missing argument is supplied, and the replacement Type Check and Docker Build (app, amd64) jobs both pass. The full Slack suite also passes, preserving the reviewed prompt-delivery changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant